@use 'sass:math';
$dWidth: 375;

@function rpx($d) {
  @return math.div($d, $dWidth) * 100 * 1vw;
}

$bg-white: white;
$bg-gray: #f8f8fb;
$bg-ccc: #cccccc;
$border-color: #f5f5f5;
$border-color-t: #e6e6e6;
$primary-color: #ff6d41;
$primary-color-t: #998aff;
$primary-color-blue: #3a9cff;
$text-color-9: #999999;
$text-color-6: #666666;
$text-color-3: #333333;
$text-color-5: rgb(229, 230, 235);
$text-color-0: #000000;
$text-color-red: #ff5733;
$text-color-3F8CFF: #3F8CFF;
$text-color-F65160: #F65160;
$text-color-91929E: #91929E;
$text-color-purered: red;
$text-color-red-t: rgba($text-color-red, 0.1);
$text-second-color: #8190b8;
$error-color: #ff4d4f;
$page-bg-color: #f6f6fa;
// 字号
$font-size-12: rpx(12);
$font-size-14: rpx(14);
$font-size-16: rpx(16);
$font-size-18: rpx(18);
$font-size-20: rpx(20);
$font-size-22: rpx(22);
$font-size-24: rpx(24);
$font-size-26: rpx(26);
$fss: 10, 12, 14, 16, 18, 20, 22, 24, 26, 30;
// 底部导航栏高度
$bottom-nav-bar-height: rpx(44);

.text-primary-color {
  color: $primary-color-blue;
}

.text-second-color {
  color: $text-second-color;
}

.page-bg {
  background-color: $page-bg-color;
}

// 详情内item字段验证错误时的提示
.float-error-block {
  position: relative;

  .float-error {
    position: absolute;
    text-align: left;
    right: 0;
    width: 100%;
    bottom: -16px;
    color: $error-color;
    max-lines: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }
}

.scroll-bar-h-min {
  overflow-y: auto;

  &::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }

  &::-webkit-scrollbar-track {
    background-color: $page-bg-color;
  }

  &::-webkit-scrollbar-thumb {
    background-color: $page-bg-color;
    border-radius: 4px;
  }
}

@each $fs in $fss {
  .font-size-#{$fs} {
    font-size: $fs * 1px;
  }

  .line-height-#{$fs} {
    line-height: $fs * 1px;
  }

  .text-indent-#{$fs} {
    text-indent: $fs * 1px;
  }
}

$wss: 10, 12, 14, 15, 16, 18, 20, 22, 24, 25, 26, 30, 40, 50, 60, 70, 75, 80, 90, 100, 110, 120, 150, 180, 200, 300, 400, 500, 600, 700, 750, 800;

@each $ws in $wss {
  .w-#{$ws} {
    width: $ws * 1px !important;
  }
  .minh-#{$ws} {
    min-height: $ws * 1px;
  }
  .minw-#{$ws} {
    min-width: $ws * 1px;
  }
  .maxh-#{$ws} {
    max-height: $ws * 1px;
  }

  .maxw-#{$ws} {
    max-height: $ws * 1px;
  }

  .h-#{$ws} {
    height: $ws * 1px;
  }

  .bw-#{$ws} {
    width: $ws * 1% !important;
  }

  .bh-#{$ws} {
    height: $ws * 1%;
  }

  .gap-#{$ws} {
    gap: $ws * 1px;
  }

  .bvh-#{$ws} {
    height: $ws * 1vh;
  }
}

// * {
//   -webkit-user-select: none; /* Safari */
//   -moz-user-select: none; /* Firefox */
//   -ms-user-select: none; /* IE10+/Edge */
//   user-select: none; /* Standard syntax */
// }

body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-size: rpx(14);
  color: $text-color-3;
  overflow: hidden;
}

.bw-100 {
  width: 100%;
}

.bh-100 {
  height: 100%;
}

.w-1 {
  width: 1px;
}

.h-1 {
  height: 1px;
}

.bg-gray {
  background-color: $bg-gray;
}

.bg-ccc {
  background-color: $bg-ccc;
}

.bg-c5c5c5 {
  background-color: $text-color-5;
}

.bg-F65160 {
  background-color: $text-color-F65160;
}

.bg-555 {
  background-color: $border-color;
}

.bg-blue {
  background-color: $primary-color-blue;
}

.bg-white {
  background-color: $bg-white;
}

.bg-p {
  background-color: $primary-color;
}

.bg-transparent {
  background-color: transparent !important;
}

.border {
  border: 1px solid $border-color;
}

.border-left {
  border-left: 1px solid $border-color;
}

.border-right {
  border-right: 1px solid $border-color;
}

.border-top {
  border-top: 1px solid $border-color;
}

.border-bottom {
  border-bottom: 1px solid $border-color;
}

$space: 2, 3, 4, 5, 10, 14, 15, 20, 30, 40, 50, 60, 70, 100, 150, 200;

@each $sp in $space {
  .m-#{$sp} {
    margin: $sp * 1px;
    box-sizing: border-box;
  }

  .ml-#{$sp} {
    margin-left: $sp * 1px;
    box-sizing: border-box;
  }

  .mr-#{$sp} {
    margin-right: $sp * 1px;
    box-sizing: border-box;
  }

  .mt-#{$sp} {
    margin-top: $sp * 1px;
    box-sizing: border-box;
  }

  .mb-#{$sp} {
    margin-bottom: $sp * 1px;
    box-sizing: border-box;
  }

  .p-#{$sp} {
    padding: $sp * 1px;
    box-sizing: border-box;
  }

  .pl-#{$sp} {
    padding-left: $sp * 1px;
    box-sizing: border-box;
  }

  .pr-#{$sp} {
    padding-right: $sp * 1px;
    box-sizing: border-box;
  }

  .pt-#{$sp} {
    padding-top: $sp * 1px;
    box-sizing: border-box;
  }

  .pb-#{$sp} {
    padding-bottom: $sp * 1px;
    box-sizing: border-box;
  }
}

$brs: 4, 5, 8, 10,15,20;

@each $br in $brs {
  .border-radius-#{$br} {
    border-radius: $br * 1px;
  }
}

.text-color-p {
  color: $primary-color;
}

.text-color-91929E {
  color: $text-color-91929E;
}

.text-color-blue {
  color: $primary-color-blue;
}

.text-color-9 {
  color: $text-color-9;
}

.text-color-6 {
  color: $text-color-6;
}

.text-color-3 {
  color: $text-color-3;
}

.text-color-0 {
  color: $text-color-0;
}

.text-color-3F8CFF {
  color: $text-color-3F8CFF !important;
}

.text-color-white {
  color: white;
}

.text-color-red {
  color: $text-color-red;
}

.text-color-purered {
  color: $text-color-purered;
}

.d-none {
  display: none;
}

.d-inline-block {
  display: inline-block;
}

.d-block {
  display: block;
}

.d-flex-r {
  display: flex;
  flex-direction: row;
}

.d-flex-c {
  display: flex;
  flex-direction: column;
}

$flxs: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;

@each $fl in $flxs {
  .flex-#{$fl} {
    flex: $fl;
  }
}

$icons: 12, 14, 16, 18, 20, 22, 24, 26, 40;

@each $ic in $icons {
  .icon-#{$ic} {
    width: $ic * 1px;
    height: $ic * 1px;
  }
}
.font-cp {
  color: $primary-color;
}
.flex-wrap {
  flex-wrap: wrap;
}

.flex-no-wrap {
  flex-wrap: nowrap;
}

.ai-inherit {
  align-items: inherit;
}

.ai-start {
  align-items: flex-start;
}

.ai-center {
  align-items: center;
}

.ai-end {
  align-items: flex-end;
}

.ac-start {
  align-content: flex-start;
}

.ac-center {
  align-content: center;
}

.ac-end {
  align-content: flex-end;
}

.jc-start {
  justify-content: flex-start;
}

.jc-center {
  justify-content: center;
}

.jc-end {
  justify-content: flex-end;
}

.jc-between {
  justify-content: space-between;
}

.jc-around {
  justify-content: space-around;
}

.jc-evenly {
  justify-content: space-evenly;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.overflow-hidden {
  overflow: hidden;
}

.detail-card {
  border-radius: 10px;
  background-color: white;

  .detail-card-title {
    display: flex;
    flex-direction: row;
    padding: 20px;
    border-bottom: 1px solid #f6f6fa;

    .line-dot {
      width: 5px;
      height: 20px;
      border-radius: 5px;
      background-color: #476bf5;
      margin-right: 20px;
    }
  }

  label {
    color: #8190b8;
  }
}

.overflow-y {
  overflow-y: auto;
  overflow-x: hidden;

  &::-webkit-scrollbar {
    display: none;
  }
}

.overflow-x {
  overflow-x: auto;
  overflow-y: hidden;

  &::-webkit-scrollbar {
    display: none;
  }
}

.omit-text {
  max-lines: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-wrap {
  word-wrap: break-word;
  white-space: break-spaces;
}

.word-nowrap {
  white-space: nowrap;
}

.loading-mask {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  background-color: rgba(#000, 0.1);
  // color: white;
  z-index: 99999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.text-error-color {
  color: $error-color;
}

.cursor-pointer {
  cursor: pointer;
}

.font-widget-600 {
  font-weight: 600;
}

.font-weight-500 {
  font-weight: 500;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.top-0 {
  top: 0;
}

.right-0 {
  right: 0;
}

.bottom-box {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba($color: #000000, $alpha: 0.4);

  .content {
    border-radius: rpx(10) rpx(10) 0 0;
    background-color: white;
  }
}

.box-shadow {
  box-shadow: 0 rpx(6) rpx(10) rgba($color: $primary-color-t, $alpha: 0.08);
}

.input-confirm-box {
  border: 1px solid $border-color;
  border-radius: rpx(4);

  .input {
    border: none;
    height: rpx(30);

    &:focus-visible {
      outline: none;
    }
  }
}

.confirm-box {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: rgba($color: #000000, $alpha: 0.4);

  .content {
    border-radius: rpx(5);
    background-color: white;
    padding-top: 0;
    width: rpx(250);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    .text {
      text-align: center;
      word-wrap: break-word;
      margin-bottom: rpx(20);
      margin-left: rpx(20);
      margin-right: rpx(20);
      box-sizing: border-box;
      color: $text-color-9;
    }
  }
}

.toast-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border-color: transparent;

  .toast {
    position: fixed;
    bottom: 50vh;
    box-sizing: border-box;
    padding: rpx(10);
    margin: rpx(10);
    font-size: rpx(14);
    background-color: rgba($color: #000000, $alpha: 0.8);
    border-radius: rpx(10);
    border: 1px solid #777;
    min-width: rpx(150);
    text-align: center;
    color: white;
    z-index: 9999999999;
  }
}

.error-block {
  margin-top: rpx(50);
  text-align: center;

  .err-img {
    width: 60vw;
  }
}

.app-loading {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: $bg-gray;
  color: $text-color-9;
}

// 复制组件
.copy-to-clipboard {
  .text-area {
    width: 0;
    height: 0;
    position: fixed;
    right: 0;
    bottom: 0;
    opacity: 0;
  }
}

// 分页器
.pagination-block {
  justify-content: flex-end;
  margin-right: 20px;
  margin-bottom: 20px;
  margin-top: 20px;
  input {

    background-color: white;
  }
  .arco-pagination-total-text {
    line-height: 36px;
  }
}
.mealList {
  background-color: #f8f8f8;
  // position: absolute;
  width: 100%;
  top: calc(30px + 30px + 40px);
  left: 0;
  bottom: 0;
  padding-top: 10px;
  // padding-bottom: 200px;
  box-sizing: border-box;
  .item {
    position: relative;
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    margin: 10px 20px auto;
    // margin-bottom: 30px;
    padding: 15px;
    border-radius: 15px;
    box-sizing: border-box;
    border: 2px solid #fff;
    .image {
      width: 50px;
      height: 50px;
      display: block;
      border-radius: 50%;
      background-color: #2869fc;
      text-align: center;
      line-height: 50px;
      color: #ffffff;
      font-size: 16px;
    }
    .flowText {
      // display: inline-block;
      width: 100px;
      font-size: 12px;
      color: #ffffff;
      background-color: #2869fc;
      border-radius: 30px;
      padding: 6px 0px;
      text-align: center;
    }
    .mealFlow {
      // margin-left: 20px;
      .t1 {
        font-size: 14px;
        display: flex;
        align-items: center;
      }
      .t2 {
        font-size: 14px;
        color: #171717;
      }
      .t3 {
        color: #aaa;
      }
    }
  }
  .seItem {
    border: 2px solid #373382;
    box-sizing: border-box;
    overflow: hidden;
  }
  .seItem::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-bottom: 40px solid #373382;
    border-left: 50px solid transparent;
    z-index: 99;
    box-sizing: border-box;
  }
  .seItem::before {
    content: "√";
    font-weight: bold;
    position: absolute;
    bottom: 0;
    right: 0;
    color: #ffffff;
    z-index: 999;
    text-align: center;
    padding-right: 10px;
    box-sizing: border-box;
  }
}